<?php
namespace app\home\controller;
use \think\Controller;
use app\home\model\ImagesModel;
use \think\Request;
class Images extends Controller
{
    public function index()
    {
            $img = new ImagesModel();
            $img = $img->getImages();
            return $img;
    }

    public function getNum()
    {
        if (Request::instance()->isPost()) {
            $limit = input('limit');
            $limit = intval($limit);
            $num = new ImagesModel();
            $num = $num->getImgNum($limit);
            return $num;
        } else {
            return false;
        }

    }
}